import React, {Component} from 'react';
import Formview from '../FormView/index';
import { getAppPageConfig } from 'src/hrpub/common/utils/utils';
const appcode = getAppPageConfig().appcode, pagecode = getAppPageConfig().pagecode;
import './index.less'
class CardList extends Component{
    constructor(props) {
        super(props);
        this.state = {
            
        }
    }
    componentDidMount () {
        
    }
    // 页面初始化执行函数
    initDataShow (paramObj) {
        let refs = this.refs
        // 初始化表单数据显示
        paramObj.mainForm = 'dataBase'
        paramObj.beforeForm = 'dataBefore'
        paramObj.afterForm = 'dataAfter'
        paramObj.pageCode = pagecode;
        refs.formView.initFormDataShow(paramObj)
    }
    // 调用formView的修改保存方法
    formViewEditSave () {
        this.refs.formView.editInfoToSaveOrTakeEffect('editSave')
    }
    // 调用form表单的方法将表单设置为编辑态
    setMainFormEdit () {
        this.refs.formView.setMainFormEdit()
    }
    // 将表格的数据重置为原来的
    resetMainFormData () {
        this.refs.formView.resetMainFormData()
    }
    // 将表格清空
    EmptyAllFormValue () {
        this.refs.formView.EmptyAllFormValue()
    }
    render () {
        return (
            <div className="cardList">
                <Formview ref="formView" {...this.props}/>
            </div>
        )
    }
}

export default CardList